package org.tony.thread.demo;

public class DeadLockDemo
{

	public static void main(String[] args)
	{
		DeadLockDemo dd = new DeadLockDemo();
		LoginWidget lg = dd.new LoginWidget();
		lg.doSomething();

	}

	public class Widget
	{

		public synchronized void doSomething()
		{
			System.out.println("Super class doSomething");
		}
	}

	public class LoginWidget extends Widget
	{
		public synchronized void doSomething()
		{
			System.out.println("Subclass doSomething");
			super.doSomething();
		}

	}

}
